<?php
/*
 * Created on 14/09/2008
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 class VOption {
 	public $html="";
 	public function VOption($cr, $id){
		$dados 	= $cr->getResultados();
		foreach ($dados as $linha) {
			$vl		=$linha["vl"];
			$opcao 	=$linha["opcao"];
				if($vl==$id){
					$this->html .="<option value='$vl' selected='selected'>$opcao</option>";
				}else {
					$this->html .="<option value='$vl'>$opcao</option>";
				}
		}
	}
 	public function __toString(){
		return $this->html;
 	}
 }
?>
